<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>SYMMETRY: func_expr.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SYMMETRY
   </div>
   <div id="projectbrief">C++LIBRARYFORSCIENTIFICCOMPUTATION</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('func__expr_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">func_expr.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef _FUNC_EXPR_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define _FUNC_EXPR_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;logarithm.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;exponential.h&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;abs_val.h&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;trig_funcs.h&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;univar_polynomial.h&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;univar_func.h&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;binary_op.h&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;variable.h&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;boost/variant.hpp&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;boost/variant/recursive_wrapper.hpp&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="structcEmptyExpr.html">   16</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcEmptyExpr.html">cEmptyExpr</a></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="structcEmptyExpr.html">cEmptyExpr</a> &amp;expr)<span class="keyword">const</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    }</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;};</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">inline</span> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, <span class="keyword">const</span> <a class="code" href="structcEmptyExpr.html">cEmptyExpr</a>&amp; expr)</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;{</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    out &lt;&lt; <span class="stringliteral">&quot;empty_expr&quot;</span>;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;}</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">//suppported functions</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">typedef</span> boost::variant&lt;cSine&lt;double&gt;,</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                    <a class="code" href="classcCosine.html">cCosine&lt;double&gt;</a>,</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                    <a class="code" href="classcTangent.html">cTangent&lt;double&gt;</a>,</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;                    <a class="code" href="classcCotangent.html">cCotangent&lt;double&gt;</a>,</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;                    <a class="code" href="classcAcotangent.html">cAcotangent&lt;double&gt;</a>,</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                    <a class="code" href="classcAsine.html">cAsine&lt;double&gt;</a>,</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                    <a class="code" href="classcAcosine.html">cAcosine&lt;double&gt;</a>,</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                    <a class="code" href="classcAtangent.html">cAtangent&lt;double&gt;</a>,</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                    <a class="code" href="classcUnivarPolynomial.html">cUnivarPolynomial&lt;double&gt;</a>,</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;                    <a class="code" href="classcExponential.html">cExponential&lt;double&gt;</a>,</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                    <a class="code" href="classcLogarithm.html">cLogarithm&lt;double&gt;</a>,</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;                    <a class="code" href="classcAbsVal.html">cAbsVal&lt;double&gt;</a>,</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                    boost::recursive_wrapper&lt;cFuncExpr&gt;,</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;                    <a class="code" href="classcVariable.html">cVariable</a>,</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                    <a class="code" href="structcEmptyExpr.html">cEmptyExpr</a>,</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                    <span class="keywordtype">double</span> &gt; expr_type;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="comment">//suppported operations</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">typedef</span> boost::variant&lt; <a class="code" href="classAddition.html">Addition</a>,</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                    <a class="code" href="classMultiplication.html">Multiplication</a>,</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                    <a class="code" href="classDivision.html">Division</a>,</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                    <a class="code" href="classSubtraction.html">Subtraction</a>,</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                    <a class="code" href="classComposition.html">Composition</a>,</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                    <a class="code" href="classPower.html">Power</a>,</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;                    <a class="code" href="structNoOp.html">NoOp</a> &gt; operation_type;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classcFuncExpr.html">   63</a></span>&#160;<span class="keyword">class </span><a class="code" href="classcFuncExpr.html">cFuncExpr</a></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;{</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a>();</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a>(expr_type univar_func);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a>(operation_type operation, expr_type univar_func1, expr_type univar_func2);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a>(<span class="keyword">const</span> <a class="code" href="classcFuncExpr.html">cFuncExpr</a> &amp;func_expr);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a>(<a class="code" href="classcFuncExpr.html">cFuncExpr</a> &amp;&amp;func_expr);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="classcFuncExpr.html">cFuncExpr</a>&amp; func_expr);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a> &amp;operator=(<a class="code" href="classcFuncExpr.html">cFuncExpr</a>&amp;&amp; func_expr);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="classcFuncExpr.html">cFuncExpr</a>&amp; fnc_expr)<span class="keyword">const</span>;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    ~<a class="code" href="classcFuncExpr.html">cFuncExpr</a>();</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classcFuncExpr.html#a169fe0532649d76e93c803ac850c764a">   87</a></span>&#160;    operation_type <a class="code" href="classcFuncExpr.html#a169fe0532649d76e93c803ac850c764a">getOperation</a>()<span class="keyword">const</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">    </span>{   <span class="keywordflow">return</span> m_Operation;     }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    expr_type getLHSExpression()<span class="keyword">const</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="keyword">    </span>{   <span class="keywordflow">return</span> m_LHSExpr;       }</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    expr_type getRHSExpression()<span class="keyword">const</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keyword">    </span>{   <span class="keywordflow">return</span> m_RHSExpr;       }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordtype">void</span> setOperation(<span class="keyword">const</span> operation_type &amp;op)</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    {   m_Operation = op;       }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordtype">void</span> setLHSExpression(<span class="keyword">const</span> expr_type &amp;expr)</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    {   m_LHSExpr = expr;       }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordtype">void</span> setRHSExpression(<span class="keyword">const</span> expr_type &amp;expr)</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    {   m_RHSExpr = expr;       }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    std::vector&lt;cVariable&gt; <a class="code" href="classcFuncExpr.html#aac4a25067ca6be3db2ba9e95501d136a">getVariables</a>()<span class="keyword">const</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classcFuncExpr.html#a1e4d0890110908c3cfe17f390016074b">simplify</a>();</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classcFuncExpr.html#a4f38c136189c0af3e361e4af67524664">trig_simplify</a>();</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classcFuncExpr.html#a54fb36206df1ca39175c4ef914f9b671">expand</a>();</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classcFuncExpr.html#af00d2b6a18cea571adeebd1e8d986d6e">factor</a>();</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a> derivative()<span class="keyword">const</span>;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a> <a class="code" href="classcFuncExpr.html#acc82c5fcb2cc98fdc8a6ec376a0e76d7">partial_derivative</a>(<span class="keyword">const</span> <a class="code" href="classcVariable.html">cVariable</a>&amp; var)<span class="keyword">const</span>;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <a class="code" href="classcFuncExpr.html">cFuncExpr</a> primitive()<span class="keyword">const</span>;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classcFuncExpr.html#a6651f4e191ec2dbbdfd053ef7a06fa15">substitute</a>(<span class="keyword">const</span> <a class="code" href="classcVariable.html">cVariable</a>&amp; var1, <span class="keyword">const</span> <a class="code" href="classcVariable.html">cVariable</a>&amp; var2);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    expr_type <a class="code" href="classcFuncExpr.html#a94a97933bf6508590d2a5bdd5d953632">operator()</a>(<span class="keyword">const</span> <a class="code" href="classcVariable.html">cVariable</a> &amp;var,<span class="keywordtype">double</span> arg)<span class="keyword">const</span>;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    std::vector&lt;std::tuple&lt;double, double, double&gt; &gt; <a class="code" href="classcFuncExpr.html#a7f827c4d0d44e4a890129317d0568dfd">plotPoints</a>(<span class="keywordtype">double</span> min, <span class="keywordtype">double</span> max, <span class="keywordtype">double</span> increment)<span class="keyword">const</span>;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classcFuncExpr.html#a210c6958768883486f404c21bed9b53b">printTree</a>(<span class="keyword">const</span> expr_type* root = <span class="keyword">nullptr</span>)<span class="keyword">const</span>;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keywordtype">void</span> printOp()<span class="keyword">const</span>;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    std::vector&lt;std::tuple&lt;double, double, double&gt; &gt; <a class="code" href="classcFuncExpr.html#a80a2b818fdf41356c390d7d5acfae2b9">plotLine</a>(std::size_t pos, <span class="keywordtype">double</span> var, <span class="keywordtype">double</span> min, <span class="keywordtype">double</span> max,</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                                                                    <span class="keywordtype">double</span> increment, <span class="keywordtype">bool</span> fixed = <span class="keyword">false</span>)<span class="keyword">const</span>;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordtype">double</span> getValue(<span class="keyword">const</span> expr_type &amp;expr)<span class="keyword">const</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">double</span> *val = boost::get&lt;double&gt;(&amp;expr);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        <span class="keywordflow">if</span>(val == <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;            <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;failed to get value, the expression doesn&#39;t contain a value&quot;</span>);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordflow">return</span> *val;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;operation_type m_Operation;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;expr_type m_LHSExpr;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;expr_type m_RHSExpr;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="comment">//friend classes</span></div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcExprDiffVisitor.html">cExprDiffVisitor</a>;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcExprPartDiffVisitor.html">cExprPartDiffVisitor</a>;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;<span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcDiffVisitor.html">cDiffVisitor</a>;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcSimplifyVisitor.html">cSimplifyVisitor</a>;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcEvalExprlVisitor.html">cEvalExprlVisitor</a>;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcEvalVisitor.html">cEvalVisitor</a>;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="keyword">friend</span> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, <span class="keyword">const</span> <a class="code" href="classcFuncExpr.html">cFuncExpr</a>&amp; func_expr);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;};</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, <span class="keyword">const</span> <a class="code" href="classcFuncExpr.html">cFuncExpr</a>&amp; func_expr);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor"></span></div>
<div class="ttc" id="classcCotangent_html"><div class="ttname"><a href="classcCotangent.html">cCotangent</a></div><div class="ttdef"><b>Definition:</b> trig_funcs.h:91</div></div>
<div class="ttc" id="classcFuncExpr_html_acc82c5fcb2cc98fdc8a6ec376a0e76d7"><div class="ttname"><a href="classcFuncExpr.html#acc82c5fcb2cc98fdc8a6ec376a0e76d7">cFuncExpr::partial_derivative</a></div><div class="ttdeci">cFuncExpr partial_derivative(const cVariable &amp;var) const </div><div class="ttdef"><b>Definition:</b> func_expr.cpp:285</div></div>
<div class="ttc" id="classcTangent_html"><div class="ttname"><a href="classcTangent.html">cTangent</a></div><div class="ttdef"><b>Definition:</b> trig_funcs.h:68</div></div>
<div class="ttc" id="classcFuncExpr_html_a94a97933bf6508590d2a5bdd5d953632"><div class="ttname"><a href="classcFuncExpr.html#a94a97933bf6508590d2a5bdd5d953632">cFuncExpr::operator()</a></div><div class="ttdeci">expr_type operator()(const cVariable &amp;var, double arg) const </div><div class="ttdef"><b>Definition:</b> func_expr.cpp:137</div></div>
<div class="ttc" id="classMultiplication_html"><div class="ttname"><a href="classMultiplication.html">Multiplication</a></div><div class="ttdef"><b>Definition:</b> binary_op.h:51</div></div>
<div class="ttc" id="classcFuncExpr_html_a1e4d0890110908c3cfe17f390016074b"><div class="ttname"><a href="classcFuncExpr.html#a1e4d0890110908c3cfe17f390016074b">cFuncExpr::simplify</a></div><div class="ttdeci">void simplify()</div><div class="ttdef"><b>Definition:</b> func_expr.cpp:269</div></div>
<div class="ttc" id="classcFuncExpr_html_a54fb36206df1ca39175c4ef914f9b671"><div class="ttname"><a href="classcFuncExpr.html#a54fb36206df1ca39175c4ef914f9b671">cFuncExpr::expand</a></div><div class="ttdeci">void expand()</div></div>
<div class="ttc" id="classcLogarithm_html"><div class="ttname"><a href="classcLogarithm.html">cLogarithm</a></div><div class="ttdef"><b>Definition:</b> exponential.h:9</div></div>
<div class="ttc" id="classcFuncExpr_html"><div class="ttname"><a href="classcFuncExpr.html">cFuncExpr</a></div><div class="ttdef"><b>Definition:</b> func_expr.h:63</div></div>
<div class="ttc" id="classcAtangent_html"><div class="ttname"><a href="classcAtangent.html">cAtangent</a></div><div class="ttdef"><b>Definition:</b> trig_funcs.h:21</div></div>
<div class="ttc" id="classComposition_html"><div class="ttname"><a href="classComposition.html">Composition</a></div><div class="ttdef"><b>Definition:</b> binary_op.h:85</div></div>
<div class="ttc" id="classPower_html"><div class="ttname"><a href="classPower.html">Power</a></div><div class="ttdef"><b>Definition:</b> binary_op.h:176</div></div>
<div class="ttc" id="classcFuncExpr_html_a4f38c136189c0af3e361e4af67524664"><div class="ttname"><a href="classcFuncExpr.html#a4f38c136189c0af3e361e4af67524664">cFuncExpr::trig_simplify</a></div><div class="ttdeci">void trig_simplify()</div></div>
<div class="ttc" id="classcAbsVal_html"><div class="ttname"><a href="classcAbsVal.html">cAbsVal</a></div><div class="ttdef"><b>Definition:</b> abs_val.h:11</div></div>
<div class="ttc" id="classcUnivarPolynomial_html"><div class="ttname"><a href="classcUnivarPolynomial.html">cUnivarPolynomial</a></div><div class="ttdef"><b>Definition:</b> univar_polynomial.h:25</div></div>
<div class="ttc" id="classcExprPartDiffVisitor_html"><div class="ttname"><a href="classcExprPartDiffVisitor.html">cExprPartDiffVisitor</a></div><div class="ttdef"><b>Definition:</b> func_expr_dif.h:235</div></div>
<div class="ttc" id="classcAsine_html"><div class="ttname"><a href="classcAsine.html">cAsine</a></div><div class="ttdef"><b>Definition:</b> trig_funcs.h:15</div></div>
<div class="ttc" id="classcSimplifyVisitor_html"><div class="ttname"><a href="classcSimplifyVisitor.html">cSimplifyVisitor</a></div><div class="ttdef"><b>Definition:</b> func_expr_visitor.h:23</div></div>
<div class="ttc" id="classDivision_html"><div class="ttname"><a href="classDivision.html">Division</a></div><div class="ttdef"><b>Definition:</b> binary_op.h:147</div></div>
<div class="ttc" id="classcFuncExpr_html_a210c6958768883486f404c21bed9b53b"><div class="ttname"><a href="classcFuncExpr.html#a210c6958768883486f404c21bed9b53b">cFuncExpr::printTree</a></div><div class="ttdeci">void printTree(const expr_type *root=nullptr) const </div><div class="ttdef"><b>Definition:</b> func_expr.cpp:238</div></div>
<div class="ttc" id="structcEmptyExpr_html"><div class="ttname"><a href="structcEmptyExpr.html">cEmptyExpr</a></div><div class="ttdef"><b>Definition:</b> func_expr.h:16</div></div>
<div class="ttc" id="classcExponential_html"><div class="ttname"><a href="classcExponential.html">cExponential</a></div><div class="ttdef"><b>Definition:</b> exponential.h:12</div></div>
<div class="ttc" id="classcFuncExpr_html_a80a2b818fdf41356c390d7d5acfae2b9"><div class="ttname"><a href="classcFuncExpr.html#a80a2b818fdf41356c390d7d5acfae2b9">cFuncExpr::plotLine</a></div><div class="ttdeci">std::vector&lt; std::tuple&lt; double, double, double &gt; &gt; plotLine(std::size_t pos, double var, double min, double max, double increment, bool fixed=false) const </div><div class="ttdef"><b>Definition:</b> func_expr.cpp:143</div></div>
<div class="ttc" id="classcAcosine_html"><div class="ttname"><a href="classcAcosine.html">cAcosine</a></div><div class="ttdef"><b>Definition:</b> trig_funcs.h:18</div></div>
<div class="ttc" id="classAddition_html"><div class="ttname"><a href="classAddition.html">Addition</a></div><div class="ttdef"><b>Definition:</b> binary_op.h:17</div></div>
<div class="ttc" id="classSubtraction_html"><div class="ttname"><a href="classSubtraction.html">Subtraction</a></div><div class="ttdef"><b>Definition:</b> binary_op.h:118</div></div>
<div class="ttc" id="classcFuncExpr_html_a7f827c4d0d44e4a890129317d0568dfd"><div class="ttname"><a href="classcFuncExpr.html#a7f827c4d0d44e4a890129317d0568dfd">cFuncExpr::plotPoints</a></div><div class="ttdeci">std::vector&lt; std::tuple&lt; double, double, double &gt; &gt; plotPoints(double min, double max, double increment) const </div><div class="ttdef"><b>Definition:</b> func_expr.cpp:202</div></div>
<div class="ttc" id="classcFuncExpr_html_a169fe0532649d76e93c803ac850c764a"><div class="ttname"><a href="classcFuncExpr.html#a169fe0532649d76e93c803ac850c764a">cFuncExpr::getOperation</a></div><div class="ttdeci">operation_type getOperation() const </div><div class="ttdef"><b>Definition:</b> func_expr.h:87</div></div>
<div class="ttc" id="classcAcotangent_html"><div class="ttname"><a href="classcAcotangent.html">cAcotangent</a></div><div class="ttdef"><b>Definition:</b> trig_funcs.h:24</div></div>
<div class="ttc" id="classcEvalExprlVisitor_html"><div class="ttname"><a href="classcEvalExprlVisitor.html">cEvalExprlVisitor</a></div><div class="ttdef"><b>Definition:</b> func_expr_eval.h:8</div></div>
<div class="ttc" id="classcFuncExpr_html_af00d2b6a18cea571adeebd1e8d986d6e"><div class="ttname"><a href="classcFuncExpr.html#af00d2b6a18cea571adeebd1e8d986d6e">cFuncExpr::factor</a></div><div class="ttdeci">void factor()</div></div>
<div class="ttc" id="classcEvalVisitor_html"><div class="ttname"><a href="classcEvalVisitor.html">cEvalVisitor</a></div><div class="ttdef"><b>Definition:</b> func_expr_eval.h:11</div></div>
<div class="ttc" id="classcExprDiffVisitor_html"><div class="ttname"><a href="classcExprDiffVisitor.html">cExprDiffVisitor</a></div><div class="ttdef"><b>Definition:</b> func_expr_dif.h:147</div></div>
<div class="ttc" id="classcDiffVisitor_html"><div class="ttname"><a href="classcDiffVisitor.html">cDiffVisitor</a></div><div class="ttdef"><b>Definition:</b> func_expr_dif.h:9</div></div>
<div class="ttc" id="classcCosine_html"><div class="ttname"><a href="classcCosine.html">cCosine</a></div><div class="ttdef"><b>Definition:</b> trig_funcs.h:48</div></div>
<div class="ttc" id="classcFuncExpr_html_a6651f4e191ec2dbbdfd053ef7a06fa15"><div class="ttname"><a href="classcFuncExpr.html#a6651f4e191ec2dbbdfd053ef7a06fa15">cFuncExpr::substitute</a></div><div class="ttdeci">void substitute(const cVariable &amp;var1, const cVariable &amp;var2)</div><div class="ttdef"><b>Definition:</b> func_expr.cpp:300</div></div>
<div class="ttc" id="classcFuncExpr_html_aac4a25067ca6be3db2ba9e95501d136a"><div class="ttname"><a href="classcFuncExpr.html#aac4a25067ca6be3db2ba9e95501d136a">cFuncExpr::getVariables</a></div><div class="ttdeci">std::vector&lt; cVariable &gt; getVariables() const </div><div class="ttdef"><b>Definition:</b> func_expr.cpp:82</div></div>
<div class="ttc" id="classcVariable_html"><div class="ttname"><a href="classcVariable.html">cVariable</a></div><div class="ttdef"><b>Definition:</b> variable.h:7</div></div>
<div class="ttc" id="structNoOp_html"><div class="ttname"><a href="structNoOp.html">NoOp</a></div><div class="ttdef"><b>Definition:</b> binary_op.h:214</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>func_expr.h</b></li>
    <li class="footer">Generated on Tue Feb 25 2014 17:11:52 for SYMMETRY by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
